package br.com.dubs.frontcontroller;

import java.util.HashMap;

public class FCMapper {
	private static FCMapper eu;

	// Guarda a referencia entre acao e target para ser usada no FrontController
	private HashMap<String, String> map = new HashMap<String, String>();

	// Classe Singleton
	private FCMapper() {
		map.put("login", "/LoginServlet");
		map.put("registerClient", "/RegisterClient");
	}

	public static FCMapper getInstance() {
		if (eu == null)
			eu = new FCMapper();
		return eu;
	}

	public String getTarget(String acao) {
		return map.get(acao);
	}

	public String getDefautTarget() {
		return "/login.jsp";
	}

}
